import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'ic:baseline-view-in-ar',
      keepAlive: true,
      order: -1,
      title: $t('mes.mesmd.title'),
    },
    name: 'Mes/md',
    path: '/mes/md',
    children: [
      {
        meta: {
          icon: 'icon-park-outline:excel',
          title: $t('mes.mesmd.children.Mditem.title'),
        },
        name: 'Mditem',
        path: 'mditem',
        component: () => import('#/views/mes/md/mditem/index.vue'),
      },
      {
        meta: {
          icon: 'oui:nested',
          title: $t('mes.mesmd.children.Itemtype.title'),
        },
        name: 'Itemtype',
        path: 'itemtype',
        component: () => import('#/views/mes/md/itemtype/index.vue'),
      },
      {
        meta: {
          icon: 'fluent:tab-group-16-regular',
          title: $t('mes.mesmd.children.Unitmeasure.title'),
        },
        name: 'Unitmeasure',
        path: 'unitmeasure',
        component: () => import('#/views/mes/md/unitmeasure/index.vue'),
      },
      {
        meta: {
          icon: 'fluent:people-48-regular',
          title: $t('mes.mesmd.children.Client.title'),
        },
        name: 'Client',
        path: 'client',
        component: () => import('#/views/mes/md/client/index.vue'),
      },
      {
        meta: {
          icon: 'fluent:people-48-regular',
          title: $t('mes.mesmd.children.Vendor.title'),
        },
        name: 'Vendor',
        path: 'vendor',
        component: () => import('#/views/mes/md/vendor/index.vue'),
      },
      {
        meta: {
          icon: 'solar:zip-file-broken',
          title: $t('mes.mesmd.children.Workshop.title'),
        },
        name: 'Workshop',
        path: 'workshop',
        component: () => import('#/views/mes/md/workshop/index.vue'),
      },
      {
        meta: {
          icon: 'hugeicons:new-job',
          title: $t('mes.mesmd.children.Workstation.title'),
        },
        name: 'Workstation',
        path: 'workstation',
        component: () => import('#/views/mes/md/workstation/index.vue'),
      },
    ],
  },
];

export default routes;
